Keep GtkMisc:xalign working for labels
authorMatthias Clasen <mclasen@redhat.com>
Tue, 30 Sep 2014 03:54:13 +0000 (23:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 30 Sep 2014 03:56:20 +0000 (23:56 -0400)
Set the new label properties when gtk_misc_set_alignment is used,
to keep things working.

gtk/deprecated/gtkmisc.c

index 279cf8a0c288652748ac352f3cfc22a9bb22cd04..bdd6eacccae90d55597ce14f6507f980fe8bc2b3 100644 (file)
@@ -25,6 +25,7 @@
 #include "config.h"
 #include "gtkcontainer.h"
 #include "gtkmisc.h"
+#include "gtklabel.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
 
@@ -254,6 +255,12 @@ gtk_misc_set_alignment (GtkMisc *misc,
       priv->xalign = xalign;
       priv->yalign = yalign;
       
+      if (GTK_IS_LABEL (misc))
+        {
+          gtk_label_set_xalign (GTK_LABEL (misc), xalign);
+          gtk_label_set_yalign (GTK_LABEL (misc), yalign);
+        }
+
       /* clear the area that was allocated before the change
        */
       widget = GTK_WIDGET (misc);